package com.zhx.rmq.consumer.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Map;

@Slf4j
@Component
@RabbitListener(queues = "topic.woman")//监听的队列名称 topic.woman
public class TopicReceiver2 {

    @RabbitHandler
    public void process(Map msg) {
        log.info("topic消费者2监听的队列名称 topic.#     收到消息ID: [{}]",msg.toString());
    }

}